3.1.71 \(\int x^2 (a+b \log (c x^n)) \log (d (e+f x)^m) \, dx\) [71]

3.1.71.1 Optimal result
3.1.71.2 Mathematica [A] (verified)
3.1.71.3 Rubi [A] (verified)
3.1.71.4 Maple [C] (warning: unable to verify)
3.1.71.5 Fricas [F]
3.1.71.6 Sympy [F(-1)]
3.1.71.7 Maxima [A] (verification not implemented)
3.1.71.8 Giac [F]
3.1.71.9 Mupad [F(-1)]

3.1.71.1 Optimal result

Integrand size = 24, antiderivative size = 243 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\frac {4 b e^2 m n x}{9 f^2}-\frac {5 b e m n x^2}{36 f}+\frac {2}{27} b m n x^3-\frac {e^2 m x \left (a+b \log \left (c x^n\right )\right )}{3 f^2}+\frac {e m x^2 \left (a+b \log \left (c x^n\right )\right )}{6 f}-\frac {1}{9} m x^3 \left (a+b \log \left (c x^n\right )\right )-\frac {b e^3 m n \log (e+f x)}{9 f^3}-\frac {b e^3 m n \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{3 f^3}+\frac {e^3 m \left (a+b \log \left (c x^n\right )\right ) \log (e+f x)}{3 f^3}-\frac {1}{9} b n x^3 \log \left (d (e+f x)^m\right )+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )-\frac {b e^3 m n \operatorname {PolyLog}\left (2,1+\frac {f x}{e}\right )}{3 f^3} \]

output
4/9*b*e^2*m*n*x/f^2-5/36*b*e*m*n*x^2/f+2/27*b*m*n*x^3-1/3*e^2*m*x*(a+b*ln( 
c*x^n))/f^2+1/6*e*m*x^2*(a+b*ln(c*x^n))/f-1/9*m*x^3*(a+b*ln(c*x^n))-1/9*b* 
e^3*m*n*ln(f*x+e)/f^3-1/3*b*e^3*m*n*ln(-f*x/e)*ln(f*x+e)/f^3+1/3*e^3*m*(a+ 
b*ln(c*x^n))*ln(f*x+e)/f^3-1/9*b*n*x^3*ln(d*(f*x+e)^m)+1/3*x^3*(a+b*ln(c*x 
^n))*ln(d*(f*x+e)^m)-1/3*b*e^3*m*n*polylog(2,1+f*x/e)/f^3
 
3.1.71.2 Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.04 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\frac {-36 a e^2 f m x+48 b e^2 f m n x+18 a e f^2 m x^2-15 b e f^2 m n x^2-12 a f^3 m x^3+8 b f^3 m n x^3+36 a e^3 m \log (e+f x)-12 b e^3 m n \log (e+f x)-36 b e^3 m n \log (x) \log (e+f x)+36 a f^3 x^3 \log \left (d (e+f x)^m\right )-12 b f^3 n x^3 \log \left (d (e+f x)^m\right )-6 b \log \left (c x^n\right ) \left (f m x \left (6 e^2-3 e f x+2 f^2 x^2\right )-6 e^3 m \log (e+f x)-6 f^3 x^3 \log \left (d (e+f x)^m\right )\right )+36 b e^3 m n \log (x) \log \left (1+\frac {f x}{e}\right )+36 b e^3 m n \operatorname {PolyLog}\left (2,-\frac {f x}{e}\right )}{108 f^3} \]

input
Integrate[x^2*(a + b*Log[c*x^n])*Log[d*(e + f*x)^m],x]
 
output
(-36*a*e^2*f*m*x + 48*b*e^2*f*m*n*x + 18*a*e*f^2*m*x^2 - 15*b*e*f^2*m*n*x^ 
2 - 12*a*f^3*m*x^3 + 8*b*f^3*m*n*x^3 + 36*a*e^3*m*Log[e + f*x] - 12*b*e^3* 
m*n*Log[e + f*x] - 36*b*e^3*m*n*Log[x]*Log[e + f*x] + 36*a*f^3*x^3*Log[d*( 
e + f*x)^m] - 12*b*f^3*n*x^3*Log[d*(e + f*x)^m] - 6*b*Log[c*x^n]*(f*m*x*(6 
*e^2 - 3*e*f*x + 2*f^2*x^2) - 6*e^3*m*Log[e + f*x] - 6*f^3*x^3*Log[d*(e + 
f*x)^m]) + 36*b*e^3*m*n*Log[x]*Log[1 + (f*x)/e] + 36*b*e^3*m*n*PolyLog[2, 
-((f*x)/e)])/(108*f^3)
 
3.1.71.3 Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 234, normalized size of antiderivative = 0.96, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2823, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx\)

\(\Big \downarrow \) 2823

\(\displaystyle -b n \int \left (\frac {m \log (e+f x) e^3}{3 f^3 x}-\frac {m e^2}{3 f^2}+\frac {m x e}{6 f}-\frac {m x^2}{9}+\frac {1}{3} x^2 \log \left (d (e+f x)^m\right )\right )dx+\frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {e^3 m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{3 f^3}-\frac {e^2 m x \left (a+b \log \left (c x^n\right )\right )}{3 f^2}+\frac {e m x^2 \left (a+b \log \left (c x^n\right )\right )}{6 f}-\frac {1}{9} m x^3 \left (a+b \log \left (c x^n\right )\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{3} x^3 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )+\frac {e^3 m \log (e+f x) \left (a+b \log \left (c x^n\right )\right )}{3 f^3}-\frac {e^2 m x \left (a+b \log \left (c x^n\right )\right )}{3 f^2}+\frac {e m x^2 \left (a+b \log \left (c x^n\right )\right )}{6 f}-\frac {1}{9} m x^3 \left (a+b \log \left (c x^n\right )\right )-b n \left (\frac {1}{9} x^3 \log \left (d (e+f x)^m\right )+\frac {e^3 m \operatorname {PolyLog}\left (2,\frac {f x}{e}+1\right )}{3 f^3}+\frac {e^3 m \log (e+f x)}{9 f^3}+\frac {e^3 m \log \left (-\frac {f x}{e}\right ) \log (e+f x)}{3 f^3}-\frac {4 e^2 m x}{9 f^2}+\frac {5 e m x^2}{36 f}-\frac {2 m x^3}{27}\right )\)

input
Int[x^2*(a + b*Log[c*x^n])*Log[d*(e + f*x)^m],x]
 
output
-1/3*(e^2*m*x*(a + b*Log[c*x^n]))/f^2 + (e*m*x^2*(a + b*Log[c*x^n]))/(6*f) 
 - (m*x^3*(a + b*Log[c*x^n]))/9 + (e^3*m*(a + b*Log[c*x^n])*Log[e + f*x])/ 
(3*f^3) + (x^3*(a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/3 - b*n*((-4*e^2*m*x 
)/(9*f^2) + (5*e*m*x^2)/(36*f) - (2*m*x^3)/27 + (e^3*m*Log[e + f*x])/(9*f^ 
3) + (e^3*m*Log[-((f*x)/e)]*Log[e + f*x])/(3*f^3) + (x^3*Log[d*(e + f*x)^m 
])/9 + (e^3*m*PolyLog[2, 1 + (f*x)/e])/(3*f^3))
 

3.1.71.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2823
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q*Log[d* 
(e + f*x^m)^r], x]}, Simp[(a + b*Log[c*x^n])   u, x] - Simp[b*n   Int[1/x 
 u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q 
+ 1)/m] || (RationalQ[m] && RationalQ[q])) && NeQ[q, -1]
 
3.1.71.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 38.64 (sec) , antiderivative size = 1067, normalized size of antiderivative = 4.39

method result size
risch \(\text {Expression too large to display}\) \(1067\)

input
int(x^2*(a+b*ln(c*x^n))*ln(d*(f*x+e)^m),x,method=_RETURNVERBOSE)
 
output
-1/18*I*m*x^3*b*Pi*csgn(I*c)*csg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ln(f*x+e)*b*Pi*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-1/3*n*b/f 
^3*e^3*m*dilog(-f*x/e)+1/3*m/f^3*e^3*ln(f*x+e)*a-1/9*x^3*a*m-1/3*b*e^3*m*n 
*ln(-f*x/e)*ln(f*x+e)/f^3+1/12*I*m/f*e*x^2*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+ 
1/12*I*m/f*e*x^2*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2-1/6*I*m/f^2*x*e^2*b*Pi*c 
sgn(I*c)*csgn(I*c*x^n)^2-1/6*I*m/f^2*x*e^2*b*Pi*csgn(I*x^n)*csgn(I*c*x^n)^ 
2+1/6*I*m/f^3*e^3*ln(f*x+e)*b*Pi*csgn(I*c)*csgn(I*c*x^n)^2+1/6*I*m/f^3*...
 
3.1.71.5 Fricas [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )} x^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate(x^2*(a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="fricas")
 
output
integral((b*x^2*log(c*x^n) + a*x^2)*log((f*x + e)^m*d), x)
 
3.1.71.6 Sympy [F(-1)]

Timed out. \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\text {Timed out} \]

input
integrate(x**2*(a+b*ln(c*x**n))*ln(d*(f*x+e)**m),x)
 
output
Timed out
 
3.1.71.7 Maxima [A] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 328, normalized size of antiderivative = 1.35 \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\frac {{\left (\log \left (\frac {f x}{e} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {f x}{e}\right )\right )} b e^{3} m n}{3 \, f^{3}} + \frac {{\left (3 \, a e^{3} m - {\left (e^{3} m n - 3 \, e^{3} m \log \left (c\right )\right )} b\right )} \log \left (f x + e\right )}{9 \, f^{3}} - \frac {36 \, b e^{3} m n \log \left (f x + e\right ) \log \left (x\right ) + 4 \, {\left (3 \, {\left (f^{3} m - 3 \, f^{3} \log \left (d\right )\right )} a - {\left (2 \, f^{3} m n - 3 \, f^{3} n \log \left (d\right ) - 3 \, {\left (f^{3} m - 3 \, f^{3} \log \left (d\right )\right )} \log \left (c\right )\right )} b\right )} x^{3} - 3 \, {\left (6 \, a e f^{2} m - {\left (5 \, e f^{2} m n - 6 \, e f^{2} m \log \left (c\right )\right )} b\right )} x^{2} + 12 \, {\left (3 \, a e^{2} f m - {\left (4 \, e^{2} f m n - 3 \, e^{2} f m \log \left (c\right )\right )} b\right )} x - 12 \, {\left (3 \, b f^{3} x^{3} \log \left (x^{n}\right ) + {\left (3 \, a f^{3} - {\left (f^{3} n - 3 \, f^{3} \log \left (c\right )\right )} b\right )} x^{3}\right )} \log \left ({\left (f x + e\right )}^{m}\right ) - 6 \, {\left (3 \, b e f^{2} m x^{2} - 6 \, b e^{2} f m x + 6 \, b e^{3} m \log \left (f x + e\right ) - 2 \, {\left (f^{3} m - 3 \, f^{3} \log \left (d\right )\right )} b x^{3}\right )} \log \left (x^{n}\right )}{108 \, f^{3}} \]

input
integrate(x^2*(a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="maxima")
 
output
1/3*(log(f*x/e + 1)*log(x) + dilog(-f*x/e))*b*e^3*m*n/f^3 + 1/9*(3*a*e^3*m 
 - (e^3*m*n - 3*e^3*m*log(c))*b)*log(f*x + e)/f^3 - 1/108*(36*b*e^3*m*n*lo 
g(f*x + e)*log(x) + 4*(3*(f^3*m - 3*f^3*log(d))*a - (2*f^3*m*n - 3*f^3*n*l 
og(d) - 3*(f^3*m - 3*f^3*log(d))*log(c))*b)*x^3 - 3*(6*a*e*f^2*m - (5*e*f^ 
2*m*n - 6*e*f^2*m*log(c))*b)*x^2 + 12*(3*a*e^2*f*m - (4*e^2*f*m*n - 3*e^2* 
f*m*log(c))*b)*x - 12*(3*b*f^3*x^3*log(x^n) + (3*a*f^3 - (f^3*n - 3*f^3*lo 
g(c))*b)*x^3)*log((f*x + e)^m) - 6*(3*b*e*f^2*m*x^2 - 6*b*e^2*f*m*x + 6*b* 
e^3*m*log(f*x + e) - 2*(f^3*m - 3*f^3*log(d))*b*x^3)*log(x^n))/f^3
 
3.1.71.8 Giac [F]

\[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\int { {\left (b \log \left (c x^{n}\right ) + a\right )} x^{2} \log \left ({\left (f x + e\right )}^{m} d\right ) \,d x } \]

input
integrate(x^2*(a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="giac")
 
output
integrate((b*log(c*x^n) + a)*x^2*log((f*x + e)^m*d), x)
 
3.1.71.9 Mupad [F(-1)]

Timed out. \[ \int x^2 \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx=\int x^2\,\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \]

input
int(x^2*log(d*(e + f*x)^m)*(a + b*log(c*x^n)),x)
 
output
int(x^2*log(d*(e + f*x)^m)*(a + b*log(c*x^n)), x)